package com.hellobike.haxing.modules.order.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hellobike.haxing.common.vo.Result;
import com.hellobike.haxing.modules.order.entity.OrderAftersale;
import com.hellobike.haxing.modules.order.entity.OrderRefund;
import com.baomidou.mybatisplus.extension.service.IService;

import java.math.BigDecimal;

/**
 * @Description: 订单退款记录
 * @Author: haxing-boot
 * @Date:   2020-02-08
 * @Version: V1.0
 */
public interface IOrderRefundService extends IService<OrderRefund> {
    /**
     * 添加退款记录
     * @param orderAfter
     */
    void saveRefundAmount(OrderAftersale orderAfter);

    /**
     * 保存退款记录
     *
     * @param orderId
     */
    void saveRefundAmount(Long orderId, BigDecimal returnAmount, String billNo);

    /**
     * 查询退款明细
     * @param page
     * @param queryWrapper
     * @return
     */
    IPage<OrderRefund> queryPage(Page<OrderRefund> page, QueryWrapper<OrderRefund> queryWrapper);

    /**
     * 再次退款操作
     * @param id
     */
    Result<?> updateRefund(Long id);
}
